package com.zjjk.transfer.app;

import com.zjjk.transfer.source.entity.SourceUserDiscount;
import com.zjjk.transfer.source.service.SourceUserDiscountService;
import com.zjjk.transfer.target.entity.TargetCustomerDiscount;
import com.zjjk.transfer.target.service.TargetCustomerDiscountService;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Component;

@Component
public class UserDiscountTransfer extends BaseTransfer<SourceUserDiscount, TargetCustomerDiscount, SourceUserDiscountService, TargetCustomerDiscountService> {
    
    @Override
    protected TargetCustomerDiscount convert(SourceUserDiscount source) {
        TargetCustomerDiscount target = new TargetCustomerDiscount();
        BeanUtils.copyProperties(source, target);
        target.setId(Long.valueOf(source.getId()));
        return target;
    }
}
